package com.skivingcloud.apiplatform.api.example.controller;

import com.skivingcloud.apiplatform.signature.annotation.SignedMapping;
import com.skivingcloud.apiplatform.signature.entity.SignedParam;
import com.skivingcloud.common.utils.R;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/apiplantform/api/example")
@SignedMapping
public class KdApiExampleController {
    private static Logger log = LoggerFactory.getLogger(KdApiExampleController.class);

    @PostMapping("/testExample")
    @SignedMapping
    public R testExample(@RequestBody SignedParam signedParam){
        log.info(signedParam.getData());
        return R.ok("调用成功了");
    }
}
